package top.milkbox.sys.modular.user.mapStruct;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import top.milkbox.sys.modular.user.entity.SysUserEntity;
import top.milkbox.sys.modular.user.param.SysUserAddParam;
import top.milkbox.sys.modular.user.param.SysUserEditParam;
import top.milkbox.sys.modular.user.param.SysUserRegisterParam;
import top.milkbox.sys.modular.user.vo.SysUserVo;

/**
 * SysUser相关的实体类之间的转换<br />
 * 此接口由MapStruct在编译时生成实现代码，详细解释请看readme<br />
 *
 * @author milkbox
 * @Data 2024-11-19
 */
@Mapper
public interface SysUserMapStruct {

    /**
     * entity转vo
     */
    @Mapping(target = "token", ignore = true)
    SysUserVo entityToVo(SysUserEntity entity);

    /**
     * addParam转entity
     */
    SysUserEntity addParamToEntity(SysUserAddParam addParam);

    /**
     * editParam转entity
     */
    SysUserEntity editParamToEntity(SysUserEditParam editParam);

    /**
     * registerParam转entity
     */
    SysUserEntity registerParamToEntity(SysUserRegisterParam registerParam);

}
